<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
        #golist {display: none;}
        @media (max-device-width: 780px){#golist{display: block !important;}}

    </style>
       <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?type=quick&ak=600b750c5e53886ec5084692f4745963&v=1.0"></script>
    <!-- <link rel="stylesheet" href="http://pocdoc-app.qiniudn.com/reset-mobile.min.css"/> -->
    <link rel="stylesheet" href="__PUBLIC__/migrate/css/reset-mobile.min.css"/>
    <link rel="stylesheet" href="__PUBLIC__/css/style.css"/>
    <!-- <link rel="stylesheet" href="http://pocdoc-app.qiniudn.com/base.css"/> -->
    <link rel="stylesheet" href="__PUBLIC__/migrate/css/base.css"/>



    <title>体检中心地图</title>

</head>
<body>
    <div class='top'>
        <a class='top_left'>
            <img src="__PUBLIC__/images/back.png">
        </a>
        <span class='sub_top_title'>地图选择</span>
        <span class='about'></span>
    </div>

    <div id="allmap"></div>

    </html>
    <script>
        $(document).ready(function(){
                //回退操作
                $(".top_left").click(function(){
                    history.go(-1);
                });

             // 百度地图API功能
          var map = new BMap.Map("allmap");
          map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);
          map.addControl(new BMap.ZoomControl()); //添加地图缩放控件
             // var data_info = [[116.417854,39.921988,"地址：北京市东城区王府井大街88号乐天银泰百货八层"],
             // [116.406605,39.921585,"地址：北京市东城区东华门大街"],
             // [116.412222,39.912345,"地址：北京市东城区正义路甲5号"]
             // ];
             var data_info={$mapInfo};
             var opts = {
                width : 250,     // 信息窗口宽度
                height: 130,     // 信息窗口高度
                title : "体检中心" , // 信息窗口标题
                enableMessage:true//设置允许信息窗发送短息
            };
            for(var i=0;i<data_info.length;i++){
        var marker = new BMap.Marker(new BMap.Point(data_info[i][0],data_info[i][1]));  // 创建标注
        var content = data_info[i][2];
        map.addOverlay(marker);               // 将标注添加到地图中
        addClickHandler(content,marker);
    }
    function addClickHandler(content,marker){
        marker.addEventListener("click",function(e){
            openInfo(content,e)}
            );
    }
    function openInfo(content,e){
        var p = e.target;
        var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
        var infoWindow = new BMap.InfoWindow(content,opts);  // 创建信息窗口对象
        map.openInfoWindow(infoWindow,point); //开启信息窗口
    }



});

    function getAddress(){
        var center_name =$(".address_label").html();
        var mcbId=$(".mcbId").val();
        var packageid=<?php echo $_GET['packageid'];?>;
        var timeShijian = "{$timeShijian}";
         window.location="/yjxtj/h5.php?m=app&a=appointStepSecond&address="+center_name+"&mcbId="+mcbId+"&packageid="+packageid+"&timeShijian="+timeShijian;
    }
</script>
